]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Animate _updateIconOpacities
authorCarlos Soriano <carlos.soriano89@gmail.com>
Thu, 22 Aug 2013 15:31:41 +0000 (17:31 +0200)
committerCarlos Soriano <carlos.soriano89@gmail.com>
Mon, 2 Sep 2013 16:57:36 +0000 (18:57 +0200)
Animate the transition between full opacity and partly opacity
to follow overall animations design of gnome-shell

https://bugzilla.gnome.org/show_bug.cgi?id=706081

js/ui/appDisplay.js

index 8c1d8b2ca84ad82cd78c01e00c1d15dd726df48e..b68a330f74568ce690235ed8683fa86320d3956c 100644 (file)
@@ -32,6 +32,7 @@ const MENU_POPUP_TIMEOUT = 600;
 const MAX_COLUMNS = 6;
 
 const INACTIVE_GRID_OPACITY = 77;
+const INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.15;
 const FOLDER_SUBICON_FRACTION = .4;
 
 
@@ -279,10 +280,15 @@ const AllView = new Lang.Class({
 
     _updateIconOpacities: function(folderOpen) {
         for (let id in this._items) {
+            let params, opacity;
             if (folderOpen && !this._items[id].actor.checked)
-                this._items[id].actor.opacity = INACTIVE_GRID_OPACITY;
+                opacity =  INACTIVE_GRID_OPACITY;
             else
-                this._items[id].actor.opacity = 255;
+                opacity = 255;
+            params = { opacity: opacity,
+                       time: INACTIVE_GRID_OPACITY_ANIMATION_TIME,
+                       transition: 'easeOutQuad' };
+            Tweener.addTween(this._items[id].actor, params);
         }
     }
 });